<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--suppress ALL-->
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<base th:href="@{/}"><!-- 不用base就使用th:src="@{/js/jquery.min.js} -->
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-用户中心</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
	<style>
		#btn {
			background: #b2f910;
			background-image: -webkit-linear-gradient(top, #b2f910, #bcbcbc);
			background-image: -moz-linear-gradient(top, #b2f910, #bcbcbc);
			background-image: -ms-linear-gradient(top, #b2f910, #bcbcbc);
			background-image: -o-linear-gradient(top, #b2f910, #bcbcbc);
			background-image: linear-gradient(to bottom, #b2f910, #bcbcbc);
			-webkit-border-radius: 60;
			-moz-border-radius: 60;
			border-radius: 60px;
			font-family: Arial;
			color: white;
			font-size: 2px;
			padding-top: px;
			padding-right: 5px;
			padding-bottom: px;
			padding-left: 5px;
			margin-right: 5px;
			text-decoration: none;
		}

		#btnTest:hover {
			background: #38761d;
			background-image: -webkit-linear-gradient(top, #38761d, #bcbcbc);
			background-image: -moz-linear-gradient(top, #38761d, #bcbcbc);
			background-image: -ms-linear-gradient(top, #38761d, #bcbcbc);
			background-image: -o-linear-gradient(top, #38761d, #bcbcbc);
			background-image: linear-gradient(to bottom, #38761d, #bcbcbc);
			text-decoration: none;
		}
	</style>
</head>
<body>
<div class="header_con">
	<div class="header">
		<div class="welcome fl">欢迎来到天天生鲜!</div>
		<div class="fr">
			<div class="login_info fl">
				欢迎您：<em>张 山</em>
			</div>
			<div class="login_btn fl">
				<a href="/index">首页</a>
				<a href="/toLogin" th:if="${session.user==null}">登录</a>
				<span th:if="${session.user!=null}" th:text="'欢迎：'+${session.user.userEmail}" style="color: black"></span>
				<span>|</span>
				<a href="/toRegister">注册</a>
			</div>
			<div class="user_link fl">
				<span>|</span>
				<a href="/toUserCenterInfo">用户中心</a>
				<span>|</span>
				<a href="/carttable/myCart">我的购物车</a>
				<span>|</span>
				<a href="/focustable/myFocus">我的收藏</a>
				<span>|</span>
				<a href="/toUserCenterOrder?currentPage=1&pageSize=4">我的订单</a>
			</div>
		</div>
	</div>
</div>

	<div class="search_bar clearfix">
		<a href="index.html" class="logo fl"><img src="images/logo.png"></a>
		<div class="sub_page_name fl">|&nbsp;&nbsp;&nbsp;&nbsp;用户中心</div>
		<div class="search_con fr">
			<form action="/goodstable/searchForGoods">
				<input type="text" class="input_text fl" name="goodsName" placeholder="搜索商品">
				<input type="submit" class="input_btn fr" name="" value="搜索">
			</form>
		</div>
	</div>

	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="/toUserCenterInfo">· 个人信息</a></li>
				<li><a href="/toUserCenterOrder?currentPage=1&pageSize=4" class="active">· 全部订单</a></li>
				<li><a href="/toUserCenterSite">· 收货地址</a></li>
			</ul>
		</div>
		<div class="right_content clearfix">
			<h3 class="common_title2">全部订单</h3>
			<div th:each="ordertable:${ordertables}">
				<ul class="order_list_th w978 clearfix">
					<li class="col01" th:text="${#dates.format(ordertable.orderDate,'yyyy-MM-dd HH:mm:ss')}"></li>
					<li class="col02">订单号：<a th:text="${ordertable.id}"></a></li>
					<li class="col02 stress" th:if="${ordertable.status==1}">未支付</li>
					<li class="col02 stress" th:if="${ordertable.status==2}">已支付</li>
					<li style="float: right"><a th:href="@{/ordertable/deleteOrder(id=${ordertable.id},currentPage=${ordertables.pageNum})}"><button id="btn" type="button">×</button></a></li>
				</ul>

				<table class="order_list_table w980">
					<tbody>
					<tr>
						<td width="55%">
							<ul class="order_goods_list clearfix" th:each="orderdetail:${orderdetails}" th:if="${ordertable.id==orderdetail.ordedetailId}">
								<div th:each="goodstable:${goodstables}" th:if="${goodstable.id==orderdetail.goodId}">
									<li class="col01"><img th:src="@{images/{picture}(picture=${goodstable.picture})}"></li>
									<li class="col02">[[${goodstable.name}]]<em>11.80元/500g</em></li>
									<li class="col03">[[${orderdetail.num}]]</li>
									<li class="col04">[[${goodstable.oldPrice}]]<a>元</a></li>
								</div>
							</ul>
						</td>
						<td width="15%"><a th:text="${ordertable.price}"></a>元</td>
						<td width="15%" th:if="${ordertable.status==1}">待付款</td>
						<td width="15%" th:if="${ordertable.status==2}">已付款</td>
						<td width="15%" th:if="${ordertable.status==1}"><a href="#" class="oper_btn">去付款</a></td>
						<td width="15%" th:if="${ordertable.status==2}"><a href="#" class="oper_btn">再逛逛</a></td>
					</tr>
					</tbody>
				</table>
			</div>
<!--			跳转控制-->
				<div class="pagenation">
					<a th:href="@{/toUserCenterOrder(currentPage=${ordertables.pageNum}-1,pageSize=4)}"><上一页</a>
					<a href="#" class="active" th:text="${ordertables.pageNum}"></a>
					<a th:href="@{/toUserCenterOrder(currentPage=${ordertables.pageNum}+1,pageSize=4)}">下一页></a>
					<a>共:<em th:text="${ordertables.pages}"></em>页</a>
					<a style="padding: 3px">
						<form action="/toUserCenterOrder">
							<input type="text" placeholder="页码" style="width: 30px" name="currentPage">
							<input type="hidden" name="pageSize" value="4">
							<button type="submit">跳转</button>
						</form>
					</a>
				</div>
		</div>
	</div>
	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>
</body>
</html>